package com.ghost;

import org.loon.framework.android.game.LGameAndroid2DActivity;

import android.content.res.Configuration;
import android.content.res.Resources;

public class Ghost extends LGameAndroid2DActivity {

    Fortscreen fortscreen;
    boolean nowisLandscape = true;

    public void onMain() {

	Resources res = this.getResources();
	this.initialization(true);
	this.setFPS(40);
	fortscreen = new Fortscreen(res);
	this.setScreen(fortscreen);
	this.setShowLogo(false);
	this.setShowFPS(true);
	this.showScreen();

    }

    public void onConfigurationChanged(Configuration newConfig) {

	// TODO Auto-generated method stub
	fortscreen.isLandscape = nowisLandscape;

	nowisLandscape = !nowisLandscape;
	if (nowisLandscape) {
	    fortscreen.screenChanged(true);
	    System.out.println("##############:" + "ORIENTATION_LANDSCAPE");

	} else {
	    fortscreen.screenChanged(false);
	    System.out.println("##############:" + "ORIENTATION_PORTRAIT");

	}

	super.onConfigurationChanged(newConfig);
    }

}
